import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/emergency/process_arrange_record_entity.dart';

ProcessArrangeRecordEntity $ProcessArrangeRecordEntityFromJson(Map<String, dynamic> json) {
  final ProcessArrangeRecordEntity processArrangeRecordEntity = ProcessArrangeRecordEntity();
  final String? approvalDate = jsonConvert.convert<String>(json['approvalDate']);
  if (approvalDate != null) {
    processArrangeRecordEntity.approvalDate = approvalDate;
  }
  final String? approvalOpinion = jsonConvert.convert<String>(json['approvalOpinion']);
  if (approvalOpinion != null) {
    processArrangeRecordEntity.approvalOpinion = approvalOpinion;
  }
  final String? approvalPersonnel = jsonConvert.convert<String>(json['approvalPersonnel']);
  if (approvalPersonnel != null) {
    processArrangeRecordEntity.approvalPersonnel = approvalPersonnel;
  }
  final String? approvalSign = jsonConvert.convert<String>(json['approvalSign']);
  if (approvalSign != null) {
    processArrangeRecordEntity.approvalSign = approvalSign;
  }
  final String? nodeName = jsonConvert.convert<String>(json['nodeName']);
  if (nodeName != null) {
    processArrangeRecordEntity.nodeName = nodeName;
  }
  return processArrangeRecordEntity;
}

Map<String, dynamic> $ProcessArrangeRecordEntityToJson(ProcessArrangeRecordEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['approvalDate'] = entity.approvalDate;
  data['approvalOpinion'] = entity.approvalOpinion;
  data['approvalPersonnel'] = entity.approvalPersonnel;
  data['approvalSign'] = entity.approvalSign;
  data['nodeName'] = entity.nodeName;
  return data;
}

extension ProcessArrangeRecordEntityExtension on ProcessArrangeRecordEntity {
  ProcessArrangeRecordEntity copyWith({
    String? approvalDate,
    String? approvalOpinion,
    String? approvalPersonnel,
    String? approvalSign,
    String? nodeName,
  }) {
    return ProcessArrangeRecordEntity()
      ..approvalDate = approvalDate ?? this.approvalDate
      ..approvalOpinion = approvalOpinion ?? this.approvalOpinion
      ..approvalPersonnel = approvalPersonnel ?? this.approvalPersonnel
      ..approvalSign = approvalSign ?? this.approvalSign
      ..nodeName = nodeName ?? this.nodeName;
  }
}
